package com.waterwolf.wolfbot.debugs;

import java.awt.Graphics;

import com.waterwolf.wolfbot.internal.Client;
import com.waterwolf.wolfbot.internal.Particle;
import com.waterwolf.wolfbot.internal.Player;
import com.waterwolf.wolfbot.internal.PlayerDef;

public class ClientHookDebug extends AbstractDebug {

    @Override
    public int paint(final Client c, final Graphics g, int i) {

        stringDrawer(g, "LoginIndex: " + c.getLoginIndex(), i++);
        stringDrawer(g, "BaseXY: " + c.getBaseX() + "x" + c.getBaseY(), i++);
        stringDrawer(g, "MyPlayerRights " + c.getMyPlayerRights(), i++);
        stringDrawer(g, "isFlagged " + c.isFlagged(), i++);
        stringDrawer(g, "MyCountry " + c.getMyCountry(), i++);
        /*
        final Player p = c.getLocalPlayer();
        String text = null;
        if (p != null) {
            text = p.getName();
            final PlayerDef def = p.getDef();
            /*if (def != null) {
                text += " w " + def.isMale() + " " + def.getCField() + " " + def.getUArray();
                
            }
        }*/
        
        //final int[] pIndex = c.getPlayerIndices();
        final Player[] players = new Player[] {c.getLocalPlayer()};
        for (final Player p : players) {
            if (p == null) {
                continue;
            }
            String add = "";
            final PlayerDef def = p.getDef();
            if (def != null) {
                add += def.getParticles();
            }
            stringDrawer(g, p.getName() + " " + add + " << ", i++);
        }
        
        //stringDrawer(g, "MyName " + text, i++);
        /*
        final GEItem[] items = c.getGEItems();
        for (final GEItem item : items) {
            if (item == null) {
                stringDrawer(g, "null", i++);
            }
            else {
                stringDrawer(g, item.getId() + " for " + item.getPrice() + " at " + item.getTransfered(), i++);
            }
        }
        */
        
        return i;
    }

}
